1. Field of the Invention
The present invention generally relates to a data protection method, and more particularly, to a data protection method for protecting personal data when a same electronic device is shared by multiple users.
2. Description of Related Art
Along with the development of technologies and the widespread of computer systems, more and more people use computer systems to process documents, browse the Internet, play audio/video files, or store data, and accordingly computer systems have become one of the most indispensable tools in our daily life. Various mechanisms for preventing others from viewing or using data stored in a computer system have been developed in order to protect the privacy of users of the computer system.
Generally speaking, a user can set up a hard disk password for protecting the data stored in a hard disk. The user can enter the basic input/output system (BIOS) when a computer system boots up and selects the corresponding menu item to set the hard disk password. The password set by the user is sent as a packet to a hard disk controller, and the computer system will require the user to enter this password when next time the computer system is turned on. The user can only access the data stored in the hard disk when he/she enters a correct password. If the user does not enter a correct password, the hard disk is then locked and accordingly the computer system cannot read any data stored in the hard disk.
Data protection becomes more important when a same computer system is shared by multiple users. To prevent others from opening, altering, or even deleting personal files, a file security mechanism is provided by an operating system and this file security mechanism allows each user to access only part of the data. When a user is about to use a computer system, the user has to input a personal password to be authorized to access the hard disk. For example, three users A, B, and C share a computer system, namely, all the personal data of these three users is stored in the hard disk of the computer system. FIG. 1 is a diagram of a file system of the computer system. As shown in FIG. 1, the file system 100 has a tree structure, wherein the root directory 110 of the file system 100 includes a shared directory 120, a directory A 130, a directory B 140, and a directory C 150, and foregoing four directories respectively include a plurality of directories and/or files. When the user A logs into the computer system with his/her password, the user A can only see and access the directories and/or file in the directory A 130 and the shared directory 120. Similarly, when the users B and C log into the computer system, they cannot see or access the directories and/or files in the directories exclusive to the other users. In other words, even though the data of all the users is stored in the hard disk, a user logged into the computer system can only access the data stored in specific directories.